A distance measuring device based on a phase difference detection method is known as an example of a distance measuring device that measures a distance to an object to be measured. In a phase difference detection method, a phase difference between object images captured by photographing the same object at different positions is detected, and a distance to the object is calculated based on the phase difference. A solid state imaging device including a charge storage type photoelectric conversion element is used to capture an object image. In a distance measuring device using a charge storage type photoelectric conversion element, if a charge storage time is not adequately controlled, there is a case where an output by photoelectric conversion can hardly be obtained, or a case where an output is saturated with respect to an incident light amount. In this case, it is difficult to detect an accurate distance to an object.
In order to avoid such a trouble, for example, measures may be taken to set an optimum storage time to a plurality of segmented regions and read image data a plurality of times. For example, as in a focusing device of a camera or the like, when the speed up of adjustment is required, a distance measuring device needs high-speed distance measurement. A solid state imaging device including a charge storage type photoelectric conversion element may promote the speed up of read processing by allowing output read to be limited to a portion of segmented regions. On the other hand, since the solid state imaging device needs to store a charge a plurality of times, high-speed phase difference detection is difficult.